﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using PrintLabel;

namespace Packaging
{
    // Token: 0x02000002 RID: 2
    public partial class fMain : Form
    {
        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        public fMain()
        {
            this.InitializeComponent();
        }

        // Token: 0x06000002 RID: 2 RVA: 0x0000208C File Offset: 0x0000028C
        private void fMain_Load(object sender, EventArgs e)
        {
            this.panel1.BackgroundImage = ClientUtils.LoadImage("ImgMain.jpg");
            this.panel1.BackgroundImageLayout = ImageLayout.Stretch;
            fMain.g_sProgram = ClientUtils.fProgramName;
            fMain.g_sEexName = ClientUtils.fCurrentProject;
            fMain.g_sFunction = ClientUtils.fFunctionName;
            fMain.g_sUserID = ClientUtils.UserPara1;
            fMain.g_sUserNO = ClientUtils.fLoginUser;
            fMain.g_sUserName = ClientUtils.fUserName;
            string text = " Select NVL(FACTORY_ID,0) FACTORY_ID  From SAJET.SYS_EMP  Where EMP_ID = '" + fMain.g_sUserID + "'";
            DataSet dataSet = ClientUtils.ExecuteSQL(text);
            fMain.g_sFactoryID = dataSet.Tables[0].Rows[0]["FACTORY_ID"].ToString();
            this.txtStip.Text = string.Empty;
            this.Check_Privilege();
            this.txtTxBarCode.Focus();
        }

        // Token: 0x06000003 RID: 3 RVA: 0x00002164 File Offset: 0x00000364
        private void Check_Privilege()
        {
            this.BtSure.Enabled = false;
            this.g_iPrivilege = ClientUtils.GetPrivilege(fMain.g_sUserID, fMain.g_sFunction, fMain.g_sProgram);
            this.BtSure.Enabled = (this.g_iPrivilege >= 1);
        }

        // Token: 0x06000004 RID: 4 RVA: 0x000021B4 File Offset: 0x000003B4
        private void textTxBarCode_KeyPress(object sender, KeyPressEventArgs e)
        {
            bool flag = e.KeyChar != '\r';
            if (!flag)
            {
                this.txtStip.Text = string.Empty;
                bool flag2 = string.IsNullOrEmpty(this.txtTxBarCode.Text);
                if (flag2)
                {
                    this.txtStip.Text = "请先刷入天线条码";
                    this.txtTxBarCode.SelectAll();
                    this.txtTxBarCode.Focus();
                }
                else
                {
                    bool flag3 = !this.checkRoute(this.txtTxBarCode.Text, 1);
                    if (flag3)
                    {
                        this.txtTxBarCode.SelectAll();
                        this.txtTxBarCode.Focus();
                    }
                    else
                    {
                        this.txtStip.Text = string.Empty;
                        this.txtZjBarCode.SelectAll();
                        this.txtZjBarCode.Focus();
                    }
                }
            }
        }

        // Token: 0x06000005 RID: 5 RVA: 0x00002288 File Offset: 0x00000488
        public bool checkRoute(string sn, int type)
        {
            bool result;
            try
            {
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        ":SN",
                        sn
                    }
                };
                string text = "SELECT B.PART_NO, A.PART_ID,B.SPEC1,B.MATERIAL_TYPE,B.SPEC2,A.PART_ID,A.WORK_ORDER ,A.CURRENT_STATUS,A.OUT_PDLINE_TIME,P.PROCESS_NAME  FROM SAJET.G_SN_STATUS A, SAJET.SYS_PART B,SAJET.SYS_PROCESS P  WHERE A.PART_ID = B.PART_ID AND A.PROCESS_ID=P.PROCESS_ID  AND A.MACID = :SN";
                DataTable dataTable = ClientUtils.ExecuteSQL(text, @params).Tables[0];
                bool flag = dataTable.Rows.Count <= 0;
                if (flag)
                {
                    this.txtStip.Text = "天线条码不存在";
                    result = false;
                }
                else
                {
                    bool flag2 = dataTable.Rows[0]["CURRENT_STATUS"].ToString() != "0";
                    if (flag2)
                    {
                        this.txtStip.Text = "天线条码状态不正确";
                        result = false;
                    }
                    else
                    {
                        bool flag3 = string.IsNullOrWhiteSpace(dataTable.Rows[0]["OUT_PDLINE_TIME"].ToString());
                        if (flag3)
                        {
                            SajetCommon.Show_Message("天线生产未结束,当前工序“" + dataTable.Rows[0]["PROCESS_NAME"].ToString() + "”", 0);
                            result = false;
                        }
                        else
                        {
                            @params = new object[][]
                            {
                                new object[]
                                {
                                    ParameterDirection.Input,
                                    OracleType.VarChar,
                                    ":SN",
                                    sn
                                }
                            };
                            text = "SELECT P.PACK_ID,P.TX_NO,P.STATE,P.CUSTOMER_ID,B.WORK_ORDER,C.CUSTOMER_NAME,D.PART_NO,D.MATERIAL_TYPE,D.SPEC1,D.SPEC2,B.PART_ID,D.option1 PART_REMARK,E.IS_CUSTOMER_PACK_NO  FROM SAJET.G_PACK P, SAJET.G_SN_STATUS B, SAJET.SYS_CUSTOMER C, SAJET.SYS_PART D,SAJET.G_WO_BASE E  WHERE P.TX_NO = :SN AND P.TX_NO = B.MACID AND P.CUSTOMER_ID = C.CUSTOMER_ID AND B.PART_ID = D.PART_ID AND P.WORK_ORDER=E.WORK_ORDER";
                            DataSet dataSet = ClientUtils.ExecuteSQL(text, @params);
                            bool flag4 = dataSet.Tables[0].Rows.Count <= 0;
                            if (flag4)
                            {
                                this.txtStip.Text = "天线条码未打印";
                                result = false;
                            }
                            else
                            {
                                bool flag5 = dataSet.Tables[0].Rows[0]["STATE"].ToString() == "2";
                                if (flag5)
                                {
                                    this.txtStip.Text = "当前天线条码所在箱号已装栈板";
                                    result = false;
                                }
                                else
                                {
                                    bool flag6 = dataSet.Tables[0].Rows[0]["STATE"].ToString() == "1";
                                    if (flag6)
                                    {
                                        string packId = dataSet.Tables[0].Rows[0]["pack_id"].ToString();
                                        this.cancelPack(packId);
                                        result = true;
                                    }
                                    else
                                    {
                                        int num = 0;
                                        int num2 = this.dataGrid.Rows.Count - 1;
                                        bool flag7 = num2 >= 0 && type == 1;
                                        if (flag7)
                                        {
                                            bool flag8 = this.dataGrid.Rows[num2].Cells["zjBarCode"].Value == null || this.dataGrid.Rows[num2].Cells["isSave"].Value.ToString() != "0";
                                            if (flag8)
                                            {
                                                num = 1;
                                                this.txtZjPartType.Text = string.Empty;
                                                this.txtZjPartName.Text = string.Empty;
                                                this.txtZjPartSpec.Text = string.Empty;
                                                this.txtZjPartNo.Text = string.Empty;
                                            }
                                        }
                                        this.txtCustomer.Text = dataSet.Tables[0].Rows[0]["CUSTOMER_NAME"].ToString();
                                        this.txtTxPartNo.Text = dataSet.Tables[0].Rows[0]["PART_NO"].ToString();
                                        this.txtTxPartType.Text = dataSet.Tables[0].Rows[0]["MATERIAL_TYPE"].ToString();
                                        this.txtTxPartSpec.Text = dataSet.Tables[0].Rows[0]["SPEC1"].ToString();
                                        this.txtTxPartName.Text = dataSet.Tables[0].Rows[0]["SPEC2"].ToString();
                                        this.txtTxPartRemark.Text = dataSet.Tables[0].Rows[0]["PART_REMARK"].ToString();
                                        this.txtIsCustomerPackNo.Text = dataSet.Tables[0].Rows[0]["IS_CUSTOMER_PACK_NO"].ToString();
                                        bool flag9 = num == 0 && type == 1;
                                        if (flag9)
                                        {
                                            this.dataGrid.Rows.Add();
                                        }
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["txBarCode"].Value = this.txtTxBarCode.Text;
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["txPartNo"].Value = this.txtTxPartNo.Text;
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["txPartSpec"].Value = this.txtTxPartSpec.Text;
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["customerId"].Value = dataSet.Tables[0].Rows[0]["CUSTOMER_ID"].ToString();
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["workOrder"].Value = dataSet.Tables[0].Rows[0]["WORK_ORDER"].ToString();
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["PackNo"].Value = "";
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["isSave"].Value = "1";
                                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["txPartRemark"].Value = dataSet.Tables[0].Rows[0]["PART_REMARK"].ToString();
                                        result = true;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = "获取天线条码信息异常" + ex.Message;
                result = false;
            }
            return result;
        }

        // Token: 0x06000006 RID: 6 RVA: 0x000029EC File Offset: 0x00000BEC
        public void cancelPack(string packId)
        {
            try
            {
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        ":ID",
                        packId
                    }
                };
                fMain.sSQL = "SELECT a.pack_id,A.TX_NO,A.ZJ_NO,A.TX_PART_ID,A.ZJ_PART_ID,A.WORK_ORDER,A.CUSTOMER_ID,A.MANUAL_NO,  TXP.PART_NO TX_PART_NO,TXP.MATERIAL_TYPE TX_MATERIAL_TYPE,TXP.SPEC1 TX_SPEC1,TXP.SPEC2 TX_SPEC2,TXP.option1 PART_REMARK, ZJP.PART_NO  ZJ_PART_NO,ZJP.MATERIAL_TYPE ZJ_MATERIAL_TYPE,ZJP.SPEC1 ZJ_SPEC1,ZJP.SPEC2 ZJ_SPEC2,   C.CUSTOMER_NAME  FROM SAJET.G_PACK A, SAJET.SYS_PART TXP, SAJET.SYS_PART ZJP, SAJET.G_WO_BASE WB, SAJET.SYS_CUSTOMER C  WHERE A.TX_PART_ID = TXP.PART_ID(+) AND A.ZJ_PART_ID = ZJP.PART_ID(+) AND A.WORK_ORDER = WB.WORK_ORDER(+) AND A.CUSTOMER_ID = C.CUSTOMER_ID(+)  AND A.pack_id = :ID AND A.STATE = 1";
                DataSet dataSet = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                bool flag = dataSet.Tables[0].Rows.Count > 0;
                if (flag)
                {
                    this.txtTxBarCode.Text = dataSet.Tables[0].Rows[0]["TX_NO"].ToString();
                    this.txtZjBarCode.Text = dataSet.Tables[0].Rows[0]["ZJ_NO"].ToString();
                    this.txtManualNo.Text = dataSet.Tables[0].Rows[0]["MANUAL_NO"].ToString();
                    this.txtTxPartType.Text = dataSet.Tables[0].Rows[0]["TX_MATERIAL_TYPE"].ToString();
                    this.txtTxPartName.Text = dataSet.Tables[0].Rows[0]["TX_SPEC2"].ToString();
                    this.txtTxPartSpec.Text = dataSet.Tables[0].Rows[0]["TX_SPEC1"].ToString();
                    this.txtZjPartType.Text = dataSet.Tables[0].Rows[0]["ZJ_MATERIAL_TYPE"].ToString();
                    this.txtZjPartName.Text = dataSet.Tables[0].Rows[0]["ZJ_SPEC2"].ToString();
                    this.txtZjPartSpec.Text = dataSet.Tables[0].Rows[0]["ZJ_SPEC1"].ToString();
                    this.txtZjPartNo.Text = dataSet.Tables[0].Rows[0]["ZJ_PART_NO"].ToString();
                    this.txtTxPartNo.Text = dataSet.Tables[0].Rows[0]["TX_PART_NO"].ToString();
                    this.txtCustomer.Text = dataSet.Tables[0].Rows[0]["CUSTOMER_NAME"].ToString();
                    this.txtTxPartRemark.Text = dataSet.Tables[0].Rows[0]["PART_REMARK"].ToString();
                }
                string text = "当前天线已装箱是否拆箱 ?" + Environment.NewLine + this.txtTxBarCode.Text;
                bool flag2 = MessageBox.Show(text, "解绑", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) != DialogResult.Yes;
                if (flag2)
                {
                    this.ClaerINData();
                }
                else
                {
                    DataTable dataTable = ClientUtils.ExecuteProc("SAJET.SJ_CANCEL_PACAGING", new object[][]
                    {
                        new object[]
                        {
                            ParameterDirection.Input,
                            OracleType.VarChar,
                            "I_PACK_ID",
                            dataSet.Tables[0].Rows[0]["pack_id"].ToString()
                        },
                        new object[]
                        {
                            ParameterDirection.Input,
                            OracleType.VarChar,
                            "I_USER",
                            ClientUtils.UserPara1
                        },
                        new object[]
                        {
                            ParameterDirection.Output,
                            OracleType.VarChar,
                            "O_RES",
                            ""
                        }
                    }).Tables[0];
                    bool flag3 = dataTable.Rows[0]["O_RES"].ToString().ToUpper() != "OK";
                    if (flag3)
                    {
                        this.txtStip.Text = dataTable.Rows[0]["O_RES"].ToString().ToUpper();
                    }
                    else
                    {
                        for (int i = 0; i <= this.dataGrid.RowCount - 1; i++)
                        {
                            string a = this.dataGrid.Rows[i].Cells["txBarCode"].Value.ToString();
                            bool flag4 = a == this.txtTxBarCode.Text;
                            if (flag4)
                            {
                                this.dataGrid.Rows.RemoveAt(i);
                                i--;
                            }
                        }
                        this.ClaerINData();
                        this.txtStip.Text = "拆箱成功";
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = "拆箱异常" + ex.Message;
            }
        }

        // Token: 0x06000007 RID: 7 RVA: 0x00002F40 File Offset: 0x00001140
        private void txtZjBarCode_KeyPress(object sender, KeyPressEventArgs e)
        {
            bool flag = e.KeyChar != '\r';
            if (!flag)
            {
                this.txtStip.Text = string.Empty;
                bool flag2 = string.IsNullOrEmpty(this.txtTxBarCode.Text);
                if (flag2)
                {
                    this.txtStip.Text = "请先刷入天线条码";
                    this.txtTxBarCode.SelectAll();
                    this.txtTxBarCode.Focus();
                }
                else
                {
                    bool flag3 = !this.checkRoute(this.txtTxBarCode.Text, 0);
                    if (flag3)
                    {
                        this.txtTxBarCode.SelectAll();
                        this.txtTxBarCode.Focus();
                    }
                    else
                    {
                        bool flag4 = string.IsNullOrEmpty(this.txtZjBarCode.Text);
                        if (flag4)
                        {
                            this.txtStip.Text = "请刷入支架条码";
                            this.txtZjBarCode.SelectAll();
                            this.txtZjBarCode.Focus();
                        }
                        else
                        {
                            bool flag5 = !this.checkJjBarCode(this.txtZjBarCode.Text);
                            if (flag5)
                            {
                                this.txtZjBarCode.SelectAll();
                                this.txtZjBarCode.Focus();
                            }
                            else
                            {
                                this.txtStip.Text = string.Empty;
                                this.txtManualNo.SelectAll();
                                this.txtManualNo.Focus();
                            }
                        }
                    }
                }
            }
        }

        // Token: 0x06000008 RID: 8 RVA: 0x00003090 File Offset: 0x00001290
        private void savePack()
        {
            try
            {
                this.txtStip.Text = string.Empty;
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        ":SN",
                        this.txtTxBarCode.Text
                    }
                };
                fMain.sSQL = "SELECT * FROM SAJET.G_PACK P WHERE P.TX_NO = :SN";
                DataSet dataSet = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                bool flag = dataSet.Tables[0].Rows.Count <= 0;
                if (flag)
                {
                    this.txtStip.Text = "条码不存在";
                    this.txtTxBarCode.SelectAll();
                    this.txtTxBarCode.Focus();
                }
                else
                {
                    bool flag2 = this.txtIsCustomerPackNo.Text == "Y";
                    if (flag2)
                    {
                        bool flag3 = dataSet.Tables[0].Rows[0]["TX_PACK_NO"].ToString() != this.txtCusPackNo.Text;
                        if (flag3)
                        {
                            this.txtStip.Text = "当前天线的包装条码和内包装不一致";
                        }
                        else
                        {
                            bool flag4 = !this.savePackData(this.txtCusPackNo.Text, dataSet.Tables[0].Rows[0]["PACK_ID"].ToString());
                            if (!flag4)
                            {
                                this.txtStip.Text = "包装成功！";
                                this.ClaerINData();
                            }
                        }
                    }
                    else
                    {
                        bool flag5 = !this.savePackData(this.txtCusPackNo.Text, dataSet.Tables[0].Rows[0]["PACK_ID"].ToString());
                        if (!flag5)
                        {
                            string customerPart = "";
                            string customerId = dataSet.Tables[0].Rows[0]["CUSTOMER_ID"].ToString();
                            bool flag6 = !string.IsNullOrWhiteSpace(customerId) && customerId != "0";
                            if (flag6)
                            {
                                @params = new object[][]
                                {
                                    new object[]
                                    {
                                        ParameterDirection.Input,
                                        OracleType.VarChar,
                                        ":CUSTOMER_ID",
                                        customerId
                                    },
                                    new object[]
                                    {
                                        ParameterDirection.Input,
                                        OracleType.VarChar,
                                        ":PART_ID",
                                        dataSet.Tables[0].Rows[0]["TX_PART_ID"].ToString()
                                    }
                                };
                                fMain.sSQL = @"SELECT CUSTOMER_PART,CUST_PART_NAME,CUST_PART_SPEC FROM SAJET.SYS_PART_CUSTOMER 
												WHERE PART_ID=:PART_ID AND CUSTOMER_ID=:CUSTOMER_ID";
                                DataSet dataSet2 = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                                bool flag7 = dataSet2.Tables[0].Rows.Count > 0;
                                if (flag7)
                                {
                                    customerPart = dataSet2.Tables[0].Rows[0]["CUSTOMER_PART"].ToString();
                                }
                            }
                            string bartendeFile = "DEFAULT_纸箱";
                            string barcoderuleId = "";
                            string strCodeRuleCode = "";
                            @params = new object[][]
                            {
                                new object[]
                                {
                                    ParameterDirection.Input,
                                    OracleType.VarChar,
                                    "CUSTOMER_ID",
                                    customerId
                                }
                            };
                            fMain.sSQL = @"SELECT A.CUSTOMER_CODE,D.Barcoderule_Id,D.BARCODERULE_CODE
									FROM SAJET.SYS_CUSTOMER A, SAJET.SYS_BARCODERULESET B, SAJET.SYS_BCRULESETDETAIL C, SAJET.SYS_BARCODERULE D
									WHERE A.CUSTOMER_ID=:CUSTOMER_ID AND A.BARCODERULESET_ID = B.BARCODERULESET_ID
									AND B.BARCODERULESET_ID = C.BCRULESET_ID AND C.BCRULE_ID = D.BARCODERULE_ID
									AND D.Remark = '纸箱'";
                            DataSet dataSet3 = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                            bool flag8 = dataSet3.Tables[0].Rows.Count > 0;
                            if (flag8)
                            {
                                barcoderuleId = dataSet3.Tables[0].Rows[0]["Barcoderule_Id"].ToString();
                                strCodeRuleCode = dataSet3.Tables[0].Rows[0]["BARCODERULE_CODE"].ToString();
                                string custCode = dataSet3.Tables[0].Rows[0]["CUSTOMER_CODE"].ToString();
                                bartendeFile = custCode + "_纸箱";
                            }
                            bool flag9 = string.IsNullOrWhiteSpace(barcoderuleId);
                            if (flag9)
                            {
                                @params = new object[][]
                                {
                                    new object[]
                                    {
                                        ParameterDirection.Input,
                                        OracleType.VarChar,
                                        "CODE",
                                        "PACK_DEFAULT"
                                    }
                                };
                                fMain.sSQL = @"SELECT A.Barcoderule_Id,A.BARCODERULE_CODE
											FROM SAJET.SYS_BARCODERULE A
											WHERE A.BARCODERULE_CODE =:CODE";
                                DataSet dataSet4 = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                                bool flag10 = dataSet4.Tables[0].Rows.Count <= 0;
                                if (flag10)
                                {
                                    this.txtStip.Text = "请配置纸箱默认条码规则";
                                    return;
                                }
                                barcoderuleId = dataSet4.Tables[0].Rows[0]["Barcoderule_Id"].ToString();
                                strCodeRuleCode = dataSet4.Tables[0].Rows[0]["BARCODERULE_CODE"].ToString();
                            }
                            string packNo = SajetCommon.SNGetNextValue(barcoderuleId, strCodeRuleCode, new object[][]
                            {
                                new object[]
                                {
                                    ParameterDirection.Input,
                                    OracleType.VarChar,
                                    "PN",
                                    customerPart
                                },
                                new object[]
                                {
                                    ParameterDirection.Input,
                                    OracleType.VarChar,
                                    "SN",
                                    this.txtTxBarCode.Text
                                }
                            }, 1);
                            bool flag11 = !this.savePackData(packNo, dataSet.Tables[0].Rows[0]["PACK_ID"].ToString());
                            if (!flag11)
                            {
                                bool @checked = this.chePackBar.Checked;
                                if (@checked)
                                {
                                    string text6 = Assembly.GetExecutingAssembly().Location;
                                    text6 = text6.Substring(0, text6.LastIndexOf('\\'));
                                    string path = text6 + "\\" + bartendeFile + ".btw";
                                    bool flag12 = !File.Exists(path);
                                    if (flag12)
                                    {
                                        this.txtStip.Text = "未找到打印模板：" + bartendeFile;
                                        return;
                                    }
                                    string text7 = "";
                                    ListBox listParam = new ListBox();
                                    ListBox listBox = new ListBox();
                                    listBox.Items.Add(packNo);
                                    Setup setup = new Setup();
                                    bool flag13 = setup.Print_Bartender_DataSource(fMain.g_sEexName, "BC_Package", bartendeFile, bartendeFile, Convert.ToInt32(this.txtPackNum.Text), "BARTENDER", "DATASOURCE", listParam, listBox, out text7);
                                    bool flag14 = text7 != "OK";
                                    if (flag14)
                                    {
                                        this.txtStip.Text = text7;
                                        return;
                                    }
                                    SajetInifile sajetInifile = new SajetInifile();
                                    string s = sajetInifile.ReadIniFile(this.g_sIniFile, "外包装打印时间间隔", "Interval", "3");
                                    int num = 3;
                                    bool flag15 = !int.TryParse(s, out num);
                                    if (flag15)
                                    {
                                    }
                                    Thread.Sleep(num * 1000);
                                    this.PackDateZJPrint(customerId, customerPart, packNo);
                                }
                                this.ClaerINData();
                                this.txtStip.Text = "包装成功!";
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = "获取支架条码信息异常:" + ex.Message;
            }
        }

        // Token: 0x06000009 RID: 9 RVA: 0x000037FC File Offset: 0x000019FC
        private bool savePackData(string packNo, string packId)
        {
            bool result;
            try
            {
                int index = this.dataGrid.Rows.Count - 1;
                DataTable dataTable = ClientUtils.ExecuteProc("SAJET.SJ_PACKAGING_NEW", new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "I_PACK_ID",
                        packId
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "I_TX_NO",
                        this.txtTxBarCode.Text
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "I_ZJ_NO",
                        this.txtZjBarCode.Text
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.Number,
                        "I_ZJ_PART_ID",
                        this.dataGrid.Rows[index].Cells["zjPartId"].Value
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "I_PACK_NO",
                        packNo
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "I_MANUAL_NO",
                        this.txtManualNo.Text
                    },
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.Number,
                        "I_USER",
                        ClientUtils.UserPara1
                    },
                    new object[]
                    {
                        ParameterDirection.Output,
                        OracleType.VarChar,
                        "O_RES",
                        ""
                    }
                }).Tables[0];
                bool flag = dataTable.Rows[0]["O_RES"].ToString().ToUpper() != "OK";
                if (flag)
                {
                    this.txtStip.Text = dataTable.Rows[0]["O_RES"].ToString().ToUpper();
                    result = false;
                }
                else
                {
                    this.dataGrid.Rows[index].Cells["isSave"].Value = "0";
                    this.dataGrid.Rows[index].Cells["PackNo"].Value = packNo;
                    result = true;
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = "保存天线包装数据异常" + ex.Message;
                result = false;
            }
            return result;
        }

        // Token: 0x0600000A RID: 10 RVA: 0x00003AC0 File Offset: 0x00001CC0
        private void PackDateZJPrint(string customerId, string customerPart, string packNo)
        {
            try
            {
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        "CUSTOMER_ID",
                        customerId
                    }
                };
                fMain.sSQL = @"SELECT A.CUSTOMER_CODE,D.Barcoderule_Id,D.BARCODERULE_CODE,D.Remark
						FROM SAJET.SYS_CUSTOMER A, SAJET.SYS_BARCODERULESET B, SAJET.SYS_BCRULESETDETAIL C, SAJET.SYS_BARCODERULE D
						WHERE A.CUSTOMER_ID=:CUSTOMER_ID AND A.BARCODERULESET_ID = B.BARCODERULESET_ID 
						AND B.BARCODERULESET_ID = C.BCRULESET_ID AND C.BCRULE_ID = D.BARCODERULE_ID
						AND (D.Remark = '包装' OR D.Remark = '包装支架' OR D.Remark = '诺基亚外包装' )";
                DataSet dataSet = ClientUtils.ExecuteSQL(fMain.sSQL, @params);
                bool flag = dataSet.Tables[0].Rows.Count <= 0;
                if (!flag)
                {
                    foreach (object obj in dataSet.Tables[0].Rows)
                    {
                        DataRow dataRow = (DataRow)obj;
                        string strBarcodeUniqueID = dataRow["Barcoderule_Id"].ToString();
                        string strCodeRuleCode = dataRow["BARCODERULE_CODE"].ToString();
                        string str = dataRow["CUSTOMER_CODE"].ToString();
                        string text = str + "_" + dataRow["Remark"].ToString();
                        string text2 = Assembly.GetExecutingAssembly().Location;
                        text2 = text2.Substring(0, text2.LastIndexOf('\\'));
                        string path = text2 + "\\" + text + ".btw";
                        bool flag2 = !File.Exists(path);
                        if (flag2)
                        {
                            this.txtStip.Text = "未找到打印模板：" + text;
                            break;
                        }
                        packNo = SajetCommon.SNGetNextValue(strBarcodeUniqueID, strCodeRuleCode, new object[][]
                        {
                            new object[]
                            {
                                ParameterDirection.Input,
                                OracleType.VarChar,
                                "PN",
                                customerPart
                            },
                            new object[]
                            {
                                ParameterDirection.Input,
                                OracleType.VarChar,
                                "SN",
                                packNo
                            }
                        }, 1);
                        int iPrintQty = 1;
                        string text3 = "";
                        ListBox listParam = new ListBox();
                        ListBox listBox = new ListBox();
                        listBox.Items.Add(packNo);
                        bool flag3 = dataRow["Remark"].ToString() == "包装" && !this.chePackDate.Checked;
                        if (!flag3)
                        {
                            SajetInifile sajetInifile = new SajetInifile();
                            string s = sajetInifile.ReadIniFile(this.g_sIniFile, "外包装打印时间间隔", "Interval", "3");
                            int num = 3;
                            bool flag4 = !int.TryParse(s, out num);
                            if (flag4)
                            {
                            }
                            Thread.Sleep(num * 1000);
                            Setup setup = new Setup();
                            bool flag5 = setup.Print_Bartender_DataSource(fMain.g_sEexName, "BC_Package", text, text, iPrintQty, "BARTENDER", "DATASOURCE", listParam, listBox, out text3);
                            bool flag6 = text3 != "OK";
                            if (flag6)
                            {
                                this.txtStip.Text = text3;
                                break;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = "获取支架条码信息异常:" + ex.Message;
            }
        }

        // Token: 0x0600000B RID: 11 RVA: 0x00003E04 File Offset: 0x00002004
        private void PrintLabel(List<string> sContent, string Model)
        {
            this.listbPrint.Items.Clear();
            try
            {
                foreach (string text in sContent)
                {
                    this.listbPrint.Items.Add(text);
                }
                PrintLabelByBarTender.Print_Label(this.listbPrint, Model, fMain.g_sProgram);
            }
            catch (Exception ex)
            {
                this.txtStip.Text = SajetCommon.SetLanguage("PrintLabel() Error") + " : " + ex.Message;
            }
        }

        // Token: 0x0600000C RID: 12 RVA: 0x00003EC0 File Offset: 0x000020C0
        private void ClaerINData()
        {
            this.txtTxBarCode.Text = string.Empty;
            this.txtZjBarCode.Text = string.Empty;
            this.txtTxPartType.Text = string.Empty;
            this.txtTxPartRemark.Text = string.Empty;
            this.txtTxPartName.Text = string.Empty;
            this.txtTxPartSpec.Text = string.Empty;
            this.txtZjPartType.Text = string.Empty;
            this.txtZjPartName.Text = string.Empty;
            this.txtZjPartSpec.Text = string.Empty;
            this.txtZjPartNo.Text = string.Empty;
            this.txtTxPartNo.Text = string.Empty;
            this.txtCustomer.Text = string.Empty;
            this.txtManualNo.Text = string.Empty;
            this.txtCusPackNo.Text = string.Empty;
            this.txtIsCustomerPackNo.Text = string.Empty;
            for (int i = 0; i <= this.dataGrid.RowCount - 1; i++)
            {
                string a = this.dataGrid.Rows[i].Cells["isSave"].Value.ToString();
                bool flag = a == "1";
                if (flag)
                {
                    this.dataGrid.Rows.RemoveAt(i);
                    i--;
                }
            }
            this.txtTxBarCode.Focus();
            this.txtTxBarCode.SelectAll();
        }

        // Token: 0x0600000D RID: 13 RVA: 0x00004058 File Offset: 0x00002258
        private bool checkJjBarCode(string txNo)
        {
            bool result;
            try
            {
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        ":NO",
                        txNo
                    }
                };
                string text = @"select g.status,p.part_type,p.part_no,p.spec1,p.material_type,p.spec2,P.PART_ID from sajet.g_material g 
								LEFT JOIN sajet.sys_part p ON G.PART_ID=P.PART_ID WHERE P.ENABLED = 'Y' and g.reel_no =:NO ";
                DataSet dataSet = ClientUtils.ExecuteSQL(text, @params);
                bool flag = dataSet.Tables[0].Rows.Count <= 0;
                if (flag)
                {
                    this.txtStip.Text = "支架条码不存在";
                    result = false;
                }
                else
                {
                    bool flag2 = dataSet.Tables[0].Rows[0]["status"].ToString().Trim() != "0";
                    if (flag2)
                    {
                        this.txtStip.Text = "支架条码已使用";
                        result = false;
                    }
                    else
                    {
                        //判断是否开启校验
                        string sqlParam = @"select t.Param_Value from sajet.sys_base_param t where t.Program='Packing' and t.Param_Name='CheckZJMaterial' ";
                        DataTable dtParam = ClientUtils.ExecuteSQL(sqlParam).Tables[0];
                        if (dtParam != null && dtParam.Rows.Count > 0 && dtParam.Rows[0]["Param_Value"].ToString() == "Y")
                        {

                            //校验是否为设定物料清单的物料
                            // 根据工序和SN 抓取工单BOM里该工序该输入的物料，箱包装工序编号：010
                            string sql = string.Format(@"select c.part_no,c.spec1,c.spec2,b.item_count,0 use_count
                                 from sajet.g_sn_status a, sajet.g_wo_bom b,sajet.sys_part c,sajet.sys_process d
                                 where a.work_order = b.work_order  and b.item_part_id = c.part_id and d.process_id=b.process_id and a.part_id=b.part_id
                                  and (a.serial_number = '{0}' or a.macid='{0}') and d.process_code='010' ", this.txtTxBarCode.Text);
                            DataTable dtBOMData = ClientUtils.ExecuteSQL(sql).Tables[0];
                            string ZJPartNo = dataSet.Tables[0].Rows[0]["part_no"].ToString();
                            if (dtBOMData != null && dtBOMData.Rows.Count > 0 && dtBOMData.Rows[0]["part_no"].ToString() == ZJPartNo)
                            {
                                //一致
                            }
                            else
                            {
                                this.txtStip.Text = $@"当前支架料号【{ZJPartNo}】与产品BOM中料号不一致，或产品BOM中没有设置支架物料";
                                result = false;
                                return result;
                            }


                        }
                        bool flag3 = !dataSet.Tables[0].Rows[0]["part_type"].ToString().Contains("支架");
                        if (flag3)
                        {
                            this.txtStip.Text = "当前条码不为支架请确认";
                            result = false;
                            return result;
                        }
                        else
                        {
                            this.txtZjPartNo.Text = dataSet.Tables[0].Rows[0]["part_no"].ToString();
                            this.txtZjPartName.Text = dataSet.Tables[0].Rows[0]["spec2"].ToString();
                            this.txtZjPartSpec.Text = dataSet.Tables[0].Rows[0]["spec1"].ToString();
                            this.txtZjPartType.Text = dataSet.Tables[0].Rows[0]["material_type"].ToString();
                            this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["zjBarCode"].Value = this.txtZjBarCode.Text;
                            this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["zjPartNo"].Value = this.txtZjPartNo.Text;
                            this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["zjPartSpec"].Value = this.txtZjPartSpec.Text;
                            this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["zjPartId"].Value = dataSet.Tables[0].Rows[0]["PART_ID"].ToString();
                            result = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = SajetCommon.SetLanguage("获取支架条码信息异常") + " : " + ex.Message;
                result = false;
            }
            return result;
        }

        // Token: 0x0600000E RID: 14 RVA: 0x000043C4 File Offset: 0x000025C4
        private void BtExit_Click_1(object sender, EventArgs e)
        {
            this.ClaerINData();
            this.dataGrid.Rows.Clear();
        }

        // Token: 0x0600000F RID: 15 RVA: 0x000043DF File Offset: 0x000025DF
        private void BtSure_Click(object sender, EventArgs e)
        {
        }

        // Token: 0x06000010 RID: 16 RVA: 0x000043E4 File Offset: 0x000025E4
        private void txtManualBarCode_KeyPress(object sender, KeyPressEventArgs e)
        {
            bool flag = e.KeyChar != '\r';
            if (!flag)
            {
                this.txtStip.Text = string.Empty;
                bool flag2 = string.IsNullOrEmpty(this.txtTxBarCode.Text);
                if (flag2)
                {
                    this.txtStip.Text = "请先刷入天线条码";
                    this.txtTxBarCode.SelectAll();
                    this.txtTxBarCode.Focus();
                }
                else
                {
                    bool flag3 = !this.checkRoute(this.txtTxBarCode.Text, 0);
                    if (flag3)
                    {
                        this.txtTxBarCode.SelectAll();
                        this.txtTxBarCode.Focus();
                    }
                    else
                    {
                        bool flag4 = string.IsNullOrEmpty(this.txtZjBarCode.Text);
                        if (flag4)
                        {
                            this.txtStip.Text = "请刷入支架条码";
                            this.txtZjBarCode.SelectAll();
                            this.txtZjBarCode.Focus();
                        }
                        else
                        {
                            bool flag5 = !this.checkJjBarCode(this.txtZjBarCode.Text);
                            if (flag5)
                            {
                                this.txtZjBarCode.SelectAll();
                                this.txtZjBarCode.Focus();
                            }
                            else
                            {
                                bool flag6 = string.IsNullOrEmpty(this.txtManualNo.Text);
                                if (flag6)
                                {
                                    this.txtStip.Text = "请刷入说明书条码";
                                    this.txtManualNo.SelectAll();
                                    this.txtManualNo.Focus();
                                }
                                else
                                {
                                    bool flag7 = !this.checkManualNo(this.txtManualNo.Text);
                                    if (flag7)
                                    {
                                        this.txtManualNo.SelectAll();
                                        this.txtManualNo.Focus();
                                    }
                                    else
                                    {
                                        bool flag8 = this.txtIsCustomerPackNo.Text == "Y";
                                        if (flag8)
                                        {
                                            this.txtCusPackNo.SelectAll();
                                            this.txtCusPackNo.Focus();
                                        }
                                        else
                                        {
                                            this.txtStip.Text = string.Empty;
                                            this.txtPackNum.SelectAll();
                                            this.txtPackNum.Focus();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        // Token: 0x06000011 RID: 17 RVA: 0x000045E8 File Offset: 0x000027E8
        private void txtCusPackNo_KeyPress(object sender, KeyPressEventArgs e)
        {
            bool flag = e.KeyChar != '\r';
            if (!flag)
            {
                this.txtStip.Text = string.Empty;
                bool flag2 = string.IsNullOrEmpty(this.txtTxBarCode.Text);
                if (flag2)
                {
                    this.txtStip.Text = "请先刷入天线条码";
                    this.txtTxBarCode.SelectAll();
                    this.txtTxBarCode.Focus();
                }
                else
                {
                    bool flag3 = !this.checkRoute(this.txtTxBarCode.Text, 0);
                    if (flag3)
                    {
                        this.txtTxBarCode.SelectAll();
                        this.txtTxBarCode.Focus();
                    }
                    else
                    {
                        bool flag4 = string.IsNullOrEmpty(this.txtZjBarCode.Text);
                        if (flag4)
                        {
                            this.txtStip.Text = "请刷入支架条码";
                            this.txtZjBarCode.SelectAll();
                            this.txtZjBarCode.Focus();
                        }
                        else
                        {
                            bool flag5 = !this.checkJjBarCode(this.txtZjBarCode.Text);
                            if (flag5)
                            {
                                this.txtZjBarCode.SelectAll();
                                this.txtZjBarCode.Focus();
                            }
                            else
                            {
                                bool flag6 = string.IsNullOrEmpty(this.txtManualNo.Text);
                                if (flag6)
                                {
                                    this.txtStip.Text = "请刷入说明书条码";
                                    this.txtManualNo.SelectAll();
                                    this.txtManualNo.Focus();
                                }
                                else
                                {
                                    bool flag7 = !this.checkManualNo(this.txtManualNo.Text);
                                    if (flag7)
                                    {
                                        this.txtManualNo.SelectAll();
                                        this.txtManualNo.Focus();
                                    }
                                    else
                                    {
                                        bool flag8 = this.txtIsCustomerPackNo.Text != "Y";
                                        if (flag8)
                                        {
                                            this.txtStip.Text = "当前天线不为客供箱条码！";
                                            this.txtStip.Text = string.Empty;
                                            this.txtPackNum.SelectAll();
                                            this.txtPackNum.Focus();
                                        }
                                        else
                                        {
                                            bool flag9 = string.IsNullOrEmpty(this.txtCusPackNo.Text);
                                            if (flag9)
                                            {
                                                this.txtStip.Text = "请刷入包装条码";
                                                this.txtCusPackNo.SelectAll();
                                                this.txtCusPackNo.Focus();
                                            }
                                            else
                                            {
                                                bool flag10 = !this.checkCustomerPackNo();
                                                if (flag10)
                                                {
                                                    this.txtCusPackNo.SelectAll();
                                                    this.txtCusPackNo.Focus();
                                                }
                                                else
                                                {
                                                    this.txtStip.Text = string.Empty;
                                                    this.savePack();
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        // Token: 0x06000012 RID: 18 RVA: 0x00004870 File Offset: 0x00002A70
        private bool checkCustomerPackNo()
        {
            bool result;
            try
            {
                bool flag = this.txtIsCustomerPackNo.Text != "Y";
                if (flag)
                {
                    this.txtStip.Text = "当前天线不为客供箱条码！";
                    result = false;
                }
                else
                {
                    object[][] @params = new object[][]
                    {
                        new object[]
                        {
                            ParameterDirection.Input,
                            OracleType.VarChar,
                            ":NO",
                            this.txtTxBarCode.Text
                        }
                    };
                    string text = "select g.TX_PACK_NO from sajet.g_pack g WHERE g.TX_NO=:NO ";
                    DataSet dataSet = ClientUtils.ExecuteSQL(text, @params);
                    bool flag2 = dataSet.Tables[0].Rows.Count <= 0;
                    if (flag2)
                    {
                        this.txtStip.Text = "天线条码不存在";
                        result = false;
                    }
                    else
                    {
                        bool flag3 = dataSet.Tables[0].Rows[0]["TX_PACK_NO"].ToString() != this.txtCusPackNo.Text;
                        if (flag3)
                        {
                            this.txtStip.Text = "当前天线的包装条码和内包装不一致";
                            result = false;
                        }
                        else
                        {
                            result = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = SajetCommon.SetLanguage("查询天线条码内包装信息异常") + " : " + ex.Message;
                result = false;
            }
            return result;
        }

        // Token: 0x06000013 RID: 19 RVA: 0x000049DC File Offset: 0x00002BDC
        private bool checkManualNo(string txNo)
        {
            bool result;
            try
            {
                object[][] @params = new object[][]
                {
                    new object[]
                    {
                        ParameterDirection.Input,
                        OracleType.VarChar,
                        ":NO",
                        txNo
                    }
                };
                string text = @"select g.status,p.part_type,p.part_no,p.spec1,p.material_type,p.spec2,P.PART_ID from sajet.g_material g 
								LEFT JOIN sajet.sys_part p ON G.PART_ID=P.PART_ID WHERE P.ENABLED = 'Y' and g.reel_no =:NO ";
                DataSet dataSet = ClientUtils.ExecuteSQL(text, @params);
                bool flag = dataSet.Tables[0].Rows.Count <= 0;
                if (flag)
                {
                    this.txtStip.Text = "说明书条码不存在";
                    result = false;
                }
                else
                {
                    bool flag2 = !dataSet.Tables[0].Rows[0]["part_type"].ToString().Contains("说明书");
                    if (flag2)
                    {
                        this.txtStip.Text = "当前条码不为说明书条码请确认";
                        result = false;
                    }
                    else
                    {
                        this.dataGrid.Rows[this.dataGrid.Rows.Count - 1].Cells["manualNo"].Value = this.txtManualNo.Text;
                        result = true;
                    }
                }
            }
            catch (Exception ex)
            {
                this.txtStip.Text = SajetCommon.SetLanguage("获取说明书条码信息异常") + " : " + ex.Message;
                result = false;
            }
            return result;
        }

        // Token: 0x06000014 RID: 20 RVA: 0x00004B48 File Offset: 0x00002D48
        private void txtPackNum_KeyPress(object sender, KeyPressEventArgs e)
        {
            bool flag = e.KeyChar == ' ';
            if (flag)
            {
                e.KeyChar = '\0';
            }
            bool flag2 = e.KeyChar == '-';
            if (flag2)
            {
                e.KeyChar = '\0';
            }
            bool flag3 = e.KeyChar == '.';
            if (!flag3)
            {
                bool flag4 = e.KeyChar == '.';
                if (flag4)
                {
                    e.KeyChar = '\0';
                }
                bool flag5 = e.KeyChar > ' ';
                if (flag5)
                {
                    try
                    {
                        float.Parse(((TextBox)sender).Text + e.KeyChar.ToString());
                    }
                    catch
                    {
                        e.KeyChar = '\0';
                    }
                }
                bool flag6 = e.KeyChar != '\r';
                if (!flag6)
                {
                    this.txtStip.Text = string.Empty;
                    this.txtManualBarCode_KeyPress(sender, e);
                    bool flag7 = string.IsNullOrWhiteSpace(this.txtPackNum.Text.Trim());
                    if (flag7)
                    {
                        SajetCommon.Show_Message("请输入生成数量", 0);
                        this.txtPackNum.SelectAll();
                        this.txtPackNum.Focus();
                    }
                    else
                    {
                        bool flag8 = !double.TryParse(this.txtPackNum.Text, out this.num);
                        if (flag8)
                        {
                            SajetCommon.Show_Message("生成数量不是数字类型", 0);
                            this.txtPackNum.Focus();
                            this.txtPackNum.SelectAll();
                        }
                        else
                        {
                            bool flag9 = this.num <= 0.0;
                            if (flag9)
                            {
                                SajetCommon.Show_Message("生成数量不能小于等于0", 0);
                                this.txtPackNum.Focus();
                                this.txtPackNum.SelectAll();
                            }
                            else
                            {
                                bool flag10 = Convert.ToInt32(this.txtPackNum.Text.Substring(0, 1)) == 0;
                                if (flag10)
                                {
                                    SajetCommon.Show_Message("请输入正确正整数", 0);
                                    this.txtPackNum.Focus();
                                    this.txtPackNum.SelectAll();
                                }
                                else
                                {
                                    bool flag11 = !this.isNumber(this.txtPackNum.Text) || !this.isNumber(this.txtPackNum.Text);
                                    if (flag11)
                                    {
                                        SajetCommon.Show_Message("请输入正确正整数", 0);
                                        this.txtPackNum.Focus();
                                        this.txtPackNum.SelectAll();
                                    }
                                    else
                                    {
                                        bool flag12 = !double.TryParse(this.txtPackNum.Text, out this.num);
                                        if (flag12)
                                        {
                                            SajetCommon.Show_Message("所输入的生成数量必须为数字类型", 0);
                                            ((TextBox)sender).Focus();
                                            ((TextBox)sender).SelectAll();
                                        }
                                        else
                                        {
                                            this.txtStip.Text = string.Empty;
                                            this.savePack();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        // Token: 0x06000015 RID: 21 RVA: 0x00004E08 File Offset: 0x00003008
        private bool isNumber(string s)
        {
            string pattern = "^[1-9][0-9]*$";
            Regex regex = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);
            return regex.IsMatch(s);
        }

        // Token: 0x04000001 RID: 1
        public static string g_sProgram;

        // Token: 0x04000002 RID: 2
        public static string g_sEexName;

        // Token: 0x04000003 RID: 3
        public static string g_sFunction;

        // Token: 0x04000004 RID: 4
        public static string g_sUserID;

        // Token: 0x04000005 RID: 5
        public static string g_sUserNO;

        // Token: 0x04000006 RID: 6
        public static string g_sFactoryID;

        // Token: 0x04000007 RID: 7
        public static string g_sAllot_ID;

        // Token: 0x04000008 RID: 8
        public static string g_sUserName;

        // Token: 0x04000009 RID: 9
        public static string sSQL;

        // Token: 0x0400000A RID: 10
        private bool Status = false;

        // Token: 0x0400000B RID: 11
        private string g_sPdlineID;

        // Token: 0x0400000C RID: 12
        private DataSet dsTemp;

        // Token: 0x0400000D RID: 13
        private int g_iPrivilege = 0;

        // Token: 0x0400000E RID: 14
        private double num;

        // Token: 0x0400000F RID: 15
        private string g_sIniFile = Application.StartupPath + "\\sajet.ini";
    }
}
